//
//  WRHomeViewController.swift
//  WeatherReport
//
//  Created by AndreaArlex on 16/1/30.
//  Copyright © 2016年 AndreaArlex. All rights reserved.
//

import UIKit
import SnapKit

class WRHomeViewController: WRFatherViewController {

    let searchBar : UISearchBar = UISearchBar()
    let mainScrollView : UIScrollView = UIScrollView()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        
//        let netWorkingManger = NetworkingManager.manager();
//        netWorkingManger.postRequest("https://api.heweather.com/x3/weather", param: ["city":"东莞","key":"ede68eee93b843a9acfaac1fb1cfe269"],successedBlock:{
//            
//            successed in
//            
//            }, failedBlock: {
//                
//                failed in
//        })
        
        self.initView()
    }
    
    /**
    初始化界面
    
    - returns: 无
    */
    func initView() {
    
        self.view.addSubview(searchBar)
        searchBar.snp_makeConstraints { (make) -> Void in
            
            make.top.equalTo(64)
            make.left.equalTo(self.view)
            make.right.equalTo(self.view)
            make.height.equalTo(44)
        }
        
        self.view.addSubview(mainScrollView)
        mainScrollView.snp_makeConstraints { (make) -> Void in
            
            make.top.equalTo(searchBar.snp_bottom)
            make.left.equalTo(self.view)
            make.right.equalTo(self.view)
            make.bottom.equalTo(self.view)
            
            
        }
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
